<template>
    <preview_bn name="classicStyleOne" :isEdit="false" :config="config"></preview_bn>
</template>

<script>
export default {
    components: {
        preview_bn: () => import('@/views/biographical_notes/components/preview_bn/index.vue'),
    },
    data() {
        return {
            name: 'preview_bn',
            config: {
                list: [],
            },
        }
    },

    created() {
        const { _id, type = 'user' } = this.getQuery()
        // 获取详情
        if (_id) {
            const obj = {
                user: 'get_bn_user',
                moban: 'get_bn_moban',
            }
            this.$apis[obj[type]]({ _id, is_detail: 1 }).then((res) => {
                const config = {}

                if (type === 'user') {
                    Object.assign(config, res.data.data.bn_content)
                }
                if (type === 'moban') {
                    Object.assign(config, res.data.data.bn_content)
                }
                Object.assign(this.config, config)
            })
        }
    },
    methods: {},
}
</script>

<style lang="scss" scoped>
.aaaa {
    display: grid;
    justify-content: space-between;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 10px;
}
</style>
